package com.zrwl.poscloud.xo.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zrwl.poscloud.base.entity.GradeTeacherR;
import com.zrwl.poscloud.base.superI.SuperMapper;
import com.zrwl.poscloud.xo.vo.GradeTeacherRVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 教师 Mapper类
 *
 * @author 刘思童 AutoGenerate
 * @date 2023-02-27
 */
public interface GradeTeacherRMapper extends SuperMapper<GradeTeacherR> {
    /**
     * 获取分页数据
     * @param page 分页
     * @param gradeTeacherRVO 参数
     * @return
     */
    IPage<GradeTeacherRVO> getPageList(@Param("page") Page page, @Param("param") GradeTeacherRVO gradeTeacherRVO);

    /**
     * 获取该课程的历史记录
     * @param gradeTeacherRVO 参数
     * @return
     */
    List<GradeTeacherRVO> getHistoryRecordList(@Param("param") GradeTeacherRVO gradeTeacherRVO);
    GradeTeacherR getTeacherBySubjectTypeAndGrade(@Param("gradeUid") String gradeUid, @Param("subjectType") int subjectType);
    List<GradeTeacherRVO> getAllList(@Param("param") GradeTeacherRVO gradeTeacherRVO);

    GradeTeacherR getGradeTeacherByEmployeeUid(@Param("employeeUid") String employeeUid, @Param("subjectType") int subjectType);

    List<GradeTeacherRVO> getEmployeeTeacher(@Param("param") GradeTeacherRVO gradeTeacherRVO);

    /**
     * 根据教师和学生获取教师（权限）
     * @param studentUid 学生
     * @param teacherUid 教师
     * @return 教师（权限）
     */
    GradeTeacherR getTeacherAuthorityByTeacherAndStudent(@Param("studentUid") String studentUid, @Param("teacherUid") String teacherUid);

    List<GradeTeacherR> getTeachersBySubjectTypeAndGrade(@Param("gradeUid")String gradeUid, @Param("subjectType")int subjectType);

    GradeTeacherR getGradeTeacher(@Param("teacherUid")String teacherUid, @Param("subjectType")int subjectType);
}
